# -*- coding: utf-8 -*-
module Gmail
  module TestData
    def test_response(body, code=200)
      # When an exception is raised, restclient clobbers method_missing.  Hence we
      # can't just use the stubs interface.
      body = JSON.generate(body) if !(body.kind_of? String)
      m = mock
      m.instance_variable_set('@gmail_values', { :body => body, :code => code })
      def m.body; @gmail_values[:body]; end
      def m.code; @gmail_values[:code]; end
      m
    end

    def test_draft(params={})
      {:id=>"1490204870554280932", :message=>{:id=>"14ae456f2ff1e3e4", :threadId=>"14ae456f2ff1e3e4", :labelIds=>["DRAFT"], :snippet=>"sd Cordialement, Julie", :historyId=>"227960", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"MIME-Version", :value=>"1.0"}, {:name=>"Received", :value=>"by 10.64.21.4 with HTTP; Tue, 13 Jan 2015 09:28:31 -0800 (PST)"}, {:name=>"Date", :value=>"Tue, 13 Jan 2015 18:28:31 +0100"}, {:name=>"Message-ID", :value=>"<CAFXNVWSNjE652y4nau3nbWeoJ7RD_UsybHWa9-L6vvRi9j3nFQ@mail.gmail.com>"}, {:name=>"Subject", :value=>""}, {:name=>"From", :value=>"Julie Desk <julie@juliedesk.com>"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=f46d042abf34a36bd9050c8bf335"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}], :body=>{:size=>28, :data=>"c2QNCkNvcmRpYWxlbWVudCwNCg0KSnVsaWUNCg=="}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=UTF-8"}], :body=>{:size=>154, :data=>"PGRpdiBkaXI9Imx0ciI-c2Q8YnIgY2xlYXI9ImFsbCI-PGRpdj48ZGl2IGNsYXNzPSJnbWFpbF9zaWduYXR1cmUiPjxkaXYgZGlyPSJsdHIiPkNvcmRpYWxlbWVudCw8ZGl2Pjxicj48L2Rpdj48ZGl2Pkp1bGllPC9kaXY-PC9kaXY-PC9kaXY-PC9kaXY-DQo8L2Rpdj4NCg=="}}]}, :sizeEstimate=>710}} .merge(params)

    end


    def test_strange_message   #it has payload.parts.parts
      {:id=>"14ae95209c15af0a", :threadId=>"14ae94601bae5138", :labelIds=>["IMPORTANT", "CATEGORY_PERSONAL"], :snippet=>"Bonjour Julie, Le plus tôt sera le mieux, j&#39;ai hâte ! Je bloque le 12/02 Merci De : Julie Desk [", :historyId=>"231473", :payload=>{:mimeType=>"multipart/related", :filename=>"", :headers=>[{:name=>"Delivered-To", :value=>"julie@juliedesk.com"}, {:name=>"Received", :value=>"by 10.64.89.39 with SMTP id bl7csp1683249ieb;        Wed, 14 Jan 2015 08:41:16 -0800 (PST)"}, {:name=>"X-Received", :value=>"by 10.194.76.205 with SMTP id m13mr8833652wjw.39.1421253675567;        Wed, 14 Jan 2015 08:41:15 -0800 (PST)"}, {:name=>"Return-Path", :value=>"<sandra.perez@esnumerique.com>"}, {:name=>"Received", :value=>"from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0770.outbound.protection.outlook.com. [2a01:111:f400:fe00::770])        by mx.google.com with ESMTPS id v10si5545148wix.4.2015.01.14.08.41.14        for <julie@juliedesk.com>        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);        Wed, 14 Jan 2015 08:41:15 -0800 (PST)"}, {:name=>"Received-SPF", :value=>"pass (google.com: domain of sandra.perez@esnumerique.com designates 2a01:111:f400:fe00::770 as permitted sender) client-ip=2a01:111:f400:fe00::770;"}, {:name=>"Authentication-Results", :value=>"mx.google.com;       spf=pass (google.com: domain of sandra.perez@esnumerique.com designates 2a01:111:f400:fe00::770 as permitted sender) smtp.mail=sandra.perez@esnumerique.com"}, {:name=>"Received", :value=>"from AMSPR06MB102.eurprd06.prod.outlook.com (10.242.90.147) by DB3PR06MB0937.eurprd06.prod.outlook.com (25.161.60.149) with Microsoft SMTP Server (TLS) id 15.1.53.17; Wed, 14 Jan 2015 16:41:13 +0000"}, {:name=>"Received", :value=>"from AMSPR06MB102.eurprd06.prod.outlook.com ([169.254.6.131]) by AMSPR06MB102.eurprd06.prod.outlook.com ([169.254.6.131]) with mapi id 15.01.0053.000; Wed, 14 Jan 2015 16:41:13 +0000"}, {:name=>"From", :value=>"Sandra Perez <sandra.perez@esnumerique.com>"}, {:name=>"To", :value=>"Julie Desk <julie@juliedesk.com>, Vincent Klingbeil <vincentklingbeil@ametix.com>"}, {:name=>"Subject", :value=>"RE: Dej"}, {:name=>"Thread-Topic", :value=>"Dej"}, {:name=>"Thread-Index", :value=>"AdAwFmdsGWjLpOTkSh6OGW1svRYHwwAAi/qAAAAdX/A="}, {:name=>"Date", :value=>"Wed, 14 Jan 2015 16:41:13 +0000"}, {:name=>"Message-ID", :value=>"<AMSPR06MB102CF5CA6B835FEA9E50E6D97410@AMSPR06MB102.eurprd06.prod.outlook.com>"}, {:name=>"References", :value=>"<AM2PR06MB09326077C9CED23112FE633DB1410@AM2PR06MB0932.eurprd06.prod.outlook.com> <CAFXNVWR_+YjgM2fMa+kcAOcUx2kiULpzXdQazrnqadDux3+prg@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAFXNVWR_+YjgM2fMa+kcAOcUx2kiULpzXdQazrnqadDux3+prg@mail.gmail.com>"}, {:name=>"Accept-Language", :value=>"fr-FR, en-US"}, {:name=>"Content-Language", :value=>"fr-FR"}, {:name=>"X-MS-Has-Attach", :value=>"yes"}, {:name=>"X-MS-TNEF-Correlator", :value=>""}, {:name=>"x-originating-ip", :value=>"[88.162.203.104]"}, {:name=>"authentication-results", :value=>"spf=none (sender IP is ) smtp.mailfrom=sandra.perez@esnumerique.com;"}, {:name=>"x-dmarcaction-test", :value=>"None"}, {:name=>"x-microsoft-antispam", :value=>"BCL:0;PCL:0;RULEID:(3005003);SRVR:DB3PR06MB0937;"}, {:name=>"x-exchange-antispam-report-test", :value=>"UriScan:;"}, {:name=>"x-exchange-antispam-report-cfa-test", :value=>"BCL:0;PCL:0;RULEID:;SRVR:DB3PR06MB0937;"}, {:name=>"x-forefront-prvs", :value=>"04569283F9"}, {:name=>"x-forefront-antispam-report", :value=>"SFV:NSPM;SFS:(10019020)(199003)(377424004)(189002)(68736005)(54356999)(76176999)(18206015028)(40100003)(99936001)(54606007)(102836002)(15975445007)(106356001)(50986999)(77156002)(62966003)(19625215002)(16236675004)(92566002)(33656002)(2950100001)(2900100001)(105586002)(221733001)(97736003)(46102003)(2656002)(87936001)(16601075003)(19300405004)(17760045003)(54206007)(66066001)(76576001)(19580395003)(101416001)(86362001)(74316001)(19580405001)(122556002)(19617315012)(64706001)(107886001)(19627595001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB3PR06MB0937;H:AMSPR06MB102.eurprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;PTR:InfoNoRecords;A:1;MX:1;LANG:fr;"}, {:name=>"received-spf", :value=>"None (protection.outlook.com: esnumerique.com does not designate permitted sender hosts)"}, {:name=>"Content-Type", :value=>"multipart/related; boundary=\"_005_AMSPR06MB102CF5CA6B835FEA9E50E6D97410AMSPR06MB102eurprd_\"; type=\"multipart/alternative\""}, {:name=>"MIME-Version", :value=>"1.0"}, {:name=>"X-OriginatorOrg", :value=>"esnumerique.com"}, {:name=>"X-MS-Exchange-CrossTenant-originalarrivaltime", :value=>"14 Jan 2015 16:41:13.6540 (UTC)"}, {:name=>"X-MS-Exchange-CrossTenant-fromentityheader", :value=>"Hosted"}, {:name=>"X-MS-Exchange-CrossTenant-id", :value=>"8d916988-dc6a-4604-9152-c47698104d7b"}, {:name=>"X-MS-Exchange-Transport-CrossTenantHeadersStamped", :value=>"DB3PR06MB0937"}], :body=>{:size=>0}, :parts=>[{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"multipart/alternative; boundary=\"_000_AMSPR06MB102CF5CA6B835FEA9E50E6D97410AMSPR06MB102eurprd_\""}], :body=>{:size=>0}, :parts=>[{:partId=>"0.0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=\"utf-8\""}, {:name=>"Content-Transfer-Encoding", :value=>"base64"}], :body=>{:size=>1223, :data=>"Qm9uam91ciBKdWxpZSwNCg0KTGUgcGx1cyB0w7R0IHNlcmEgbGUgbWlldXgsIGrigJlhaSBow6J0ZSAhDQoNCkplIGJsb3F1ZSBsZSAxMi8wMg0KDQpNZXJjaQ0KDQpEZSA6IEp1bGllIERlc2sgW21haWx0bzpqdWxpZUBqdWxpZWRlc2suY29tXQ0KRW52b3nDqSA6IG1lcmNyZWRpIDE0IGphbnZpZXIgMjAxNSAxNzozOQ0Kw4AgOiBWaW5jZW50IEtsaW5nYmVpbA0KQ2MgOiBTYW5kcmEgUGVyZXoNCk9iamV0IDogUmU6IERlag0KDQpCb25qb3VyIFNhbmRyYSwNCg0KVmluY2VudCBlc3QgZGlzcG9uaWJsZSBwb3VyIGTDqWpldW5lciBhdmVjIHZvdXMgYXV4IGhvcmFpcmVzIHN1aXZhbnRzIDoNCg0KLSBKZXVkaSAxMiBGw6l2cmllciDDoCAxMjozMA0KLSBWZW5kcmVkaSAxMyBGw6l2cmllciDDoCAxMjozMA0KLSBMdW5kaSAxNiBGw6l2cmllciDDoCAxMjozMA0KLSBNZXJjcmVkaSAxOCBGw6l2cmllciDDoCAxMjozMA0KDQoNClF1ZWwgaG9yYWlyZSB2b3VzIGNvbnZpZW50IGxlIG1pZXV4ID8NCltodHRwczovL21haWxmb29nYWUuYXBwc3BvdC5jb20vdD9zZW5kZXI9YWFuVnNhV1ZBYW5Wc2FXVmtaWE5yTG1OdmJRJTNEJTNEJnR5cGU9emVyb2NvbnRlbnQmZ3VpZD02NDcxZGFjYS0wODYwLTQ3YWEtYTlkZS1iYjI5MzFlOTUxMWZd4ZCnDQoNCkNvcmRpYWxlbWVudCwNCg0KSnVsaWUNCg0KMjAxNS0wMS0xNCAxNzoyOCBHTVQrMDE6MDAgVmluY2VudCBLbGluZ2JlaWwgPHZpbmNlbnRrbGluZ2JlaWxAYW1ldGl4LmNvbTxtYWlsdG86dmluY2VudGtsaW5nYmVpbEBhbWV0aXguY29tPj46DQpIZWxsbyBTYW5kcmEsDQoNCkp1bGllIChlbiBjYykgdmEgdGUgcHJvcG9zZXIgZGVzIGRpc3BvcyBwb3VyIHVuIGRlai4NCg0KQSB0csOocyBiaWVudMO0dCwNCg0KDQoNCi0tLQ0KDQpWaW5jZW50IEtMSU5HQkVJTCAgW2NpZDppbWFnZTAwMy5qcGdAMDFDRjFEQjIuQkZCMTVEOTBdICBEaXJlY3RldXIgQXNzb2Npw6kNCjExLCBydWUgUm91Z2Vtb250IC0gNzUwMDkgUGFyaXMNClRlbCAgIDogMDEgODQgMTYgMTYgNTUNCk1vYiA6IDA2IDIyIDcyIDgzIDE3DQpFLW1haWwgOiB2aW5jZW50LmtsaW5nYmVpbEBhbWV0aXguY29tPG1haWx0bzp2aW5jZW50LmtsaW5nYmVpbEBhbWV0aXguY29tPg0KU2l0ZSA6IGh0dHA6Ly93d3cuYW1ldGl4LmNvbTxodHRwOi8vd3d3LmFtZXRpeC5jb20vPg0KDQpbY2lkOmltYWdlMDA0LnBuZ0AwMUNGMURCMi5CRkIxNUQ5MF0NCg0KDQo="}}, {:partId=>"0.1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=\"utf-8\""}, {:name=>"Content-Transfer-Encoding", :value=>"base64"}], :body=>{:size=>8246, :data=>"PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSIgeG1sbnM6dz0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6d29yZCIgeG1sbnM6bT0iaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS9vZmZpY2UvMjAwNC8xMi9vbW1sIiB4bWxucz0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JvdHRvbS1hbHQ6YXV0byI-Jm5ic3A7PG86cD48L286cD48L3A-DQo8L2Rpdj4NCjwvZGl2Pg0KPC9ibG9ja3F1b3RlPg0KPC9kaXY-DQo8cCBjbGFzcz0iTXNvTm9ybWFsIj48bzpwPiZuYnNwOzwvbzpwPjwvcD4NCjwvZGl2Pg0KPC9kaXY-DQo8L2JvZHk-DQo8L2h0bWw-DQo="}}]}, {:partId=>"1", :mimeType=>"image/jpeg", :filename=>"image001.jpg", :headers=>[{:name=>"Content-Type", :value=>"image/jpeg; name=\"image001.jpg\""}, {:name=>"Content-Description", :value=>"image001.jpg"}, {:name=>"Content-Disposition", :value=>"inline; filename=\"image001.jpg\"; size=745; creation-date=\"Wed, 14 Jan 2015 16:41:12 GMT\"; modification-date=\"Wed, 14 Jan 2015 16:41:12 GMT\""}, {:name=>"Content-ID", :value=>"<image001.jpg@01D03020.A81D3EC0>"}, {:name=>"Content-Transfer-Encoding", :value=>"base64"}], :body=>{:attachmentId=>"ANGjdJ9EUce9luxTns6YCguM66uWOxWwYQvDeG0x_b--7WtuX286rMcFGJCzxreUbo81SqPcPmi_SH4Pwj5n6OhAGDh1U2vogEB2JE13baFrUObxecXTeaaO6jeq78j7dv6ZtY0ivtRdQQKFDddIctZ2xDYJ7YuMNm1LDpuWGR5f_yNIDL-9t5EQY8FWEGhcXAZOS_JSxqc5v469Mxt9bRK6-r-8I7p6C9kEtxm6s1DMpEMaV0veKGU7Fcu7kpO7_6xoCc16fMGDWnlX5tmRv1KGopc9E5WQoq453aFAig", :size=>1024}}, {:partId=>"2", :mimeType=>"image/png", :filename=>"image002.png", :headers=>[{:name=>"Content-Type", :value=>"image/png; name=\"image002.png\""}, {:name=>"Content-Description", :value=>"image002.png"}, {:name=>"Content-Disposition", :value=>"inline; filename=\"image002.png\"; size=18240; creation-date=\"Wed, 14 Jan 2015 16:41:13 GMT\"; modification-date=\"Wed, 14 Jan 2015 16:41:13 GMT\""}, {:name=>"Content-ID", :value=>"<image002.png@01D03020.A81D3EC0>"}, {:name=>"Content-Transfer-Encoding", :value=>"base64"}], :body=>{:attachmentId=>"ANGjdJ9ZpRLg9NX7RpBGCcmbfrARNV5R3BJLY2O5jKfpgfpe1rntEYXw0Vr0bIYMMU9DJ3jc-ofm2NNsKeu5wkjB3IglrGe19BHrgjWh9Mz_65H-Lp3x_avlwVg4Tm1lmyWF6POmK5BN64vlwQGcSJbaytrRI6PuRVeLLBWI32xfllZi-N_Pf9JNPgNouf_jVP8XFzl9pPD6gIaUugsMNdUXPEyx0pY00JOhgkP1P0Wcz6EU931R9Au19mYdO87ROzdBAea7ekqA3xHT5E7XpnC5O9XyJAray1D9iPWVcQ", :size=>24960}}]}, :sizeEstimate=>44153}
    end

    def test_draft_list(params={})
      {:drafts=>[{:id=>"1490204870554280932", :message=>{:id=>"14ae456f2ff1e3e4", :threadId=>"14ae456f2ff1e3e4"}}, {:id=>"1490204870554280939", :message=>{:id=>"14ae456f2ff1e3e5", :threadId=>"14ae456f2ff1e3e5"}}], :resultSizeEstimate=>2}.merge(params)
    end

    def test_label params={}
      {
          :id=>"CATEGORY_UPDATES",
          :name=>"CATEGORY_UPDATES",
          :messageListVisibility=>"hide",
          :labelListVisibility=>"labelHide",
          :type=>"system",
          :messagesTotal=>129,
          :messagesUnread=>33,
          :threadsTotal=>105,
          :threadsUnread=>21
      }.merge(params)
    end

    def test_label_list(params={})
      {:labels=>[{:id=>"CATEGORY_UPDATES", :name=>"CATEGORY_UPDATES", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}, {:id=>"UNREAD", :name=>"UNREAD", :type=>"system"}, {:id=>"DRAFT", :name=>"DRAFT", :messageListVisibility=>"hide", :labelListVisibility=>"labelShow", :type=>"system"}, {:id=>"INBOX", :name=>"INBOX", :messageListVisibility=>"hide", :labelListVisibility=>"labelShow", :type=>"system"}, {:id=>"CATEGORY_PROMOTIONS", :name=>"CATEGORY_PROMOTIONS", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}, {:id=>"CATEGORY_SOCIAL", :name=>"CATEGORY_SOCIAL", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}, {:id=>"CATEGORY_PERSONAL", :name=>"CATEGORY_PERSONAL", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}, {:id=>"CATEGORY_FORUMS", :name=>"CATEGORY_FORUMS", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}, {:id=>"TRASH", :name=>"TRASH", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}, {:id=>"IMPORTANT", :name=>"IMPORTANT", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}, {:id=>"SENT", :name=>"SENT", :messageListVisibility=>"hide", :labelListVisibility=>"labelShow", :type=>"system"}, {:id=>"STARRED", :name=>"STARRED", :messageListVisibility=>"hide", :labelListVisibility=>"labelShow", :type=>"system"}, {:id=>"SPAM", :name=>"SPAM", :messageListVisibility=>"hide", :labelListVisibility=>"labelHide", :type=>"system"}]}.merge(params)
    end

    def test_thread(params = {})
      {:id=>"14ae456f2ff1e3e4", :historyId=>"227960", :messages=>[
          {:id=>"14ae456f2ff1e3e4", :threadId=>"14ae456f2ff1e3e4", :labelIds=>["DRAFT"], :snippet=>"sd Cordialement, Julie", :historyId=>"227960", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"MIME-Version", :value=>"1.0"}, {:name=>"Received", :value=>"by 10.64.21.4 with HTTP; Tue, 13 Jan 2015 09:28:31 -0800 (PST)"}, {:name=>"Date", :value=>"Tue, 13 Jan 2015 18:28:31 +0100"}, {:name=>"Message-ID", :value=>"<CAFXNVWSNjE652y4nau3nbWeoJ7RD_UsybHWa9-L6vvRi9j3nFQ@mail.gmail.com>"}, {:name=>"Subject", :value=>""}, {:name=>"From", :value=>"Julie Desk <julie@juliedesk.com>"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=f46d042abf34a36bd9050c8bf335"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}], :body=>{:size=>28, :data=>"c2QNCkNvcmRpYWxlbWVudCwNCg0KSnVsaWUNCg=="}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=UTF-8"}], :body=>{:size=>154, :data=>"PGRpdiBkaXI9Imx0ciI-c2Q8YnIgY2xlYXI9ImFsbCI-PGRpdj48ZGl2IGNsYXNzPSJnbWFpbF9zaWduYXR1cmUiPjxkaXYgZGlyPSJsdHIiPkNvcmRpYWxlbWVudCw8ZGl2Pjxicj48L2Rpdj48ZGl2Pkp1bGllPC9kaXY-PC9kaXY-PC9kaXY-PC9kaXY-DQo8L2Rpdj4NCg=="}}]}, :sizeEstimate=>710},
          {:id=>"14ae456f2ff1e3e4", :threadId=>"14ae456f2ff1e3e4", :labelIds=>["SENT"], :snippet=>"sd Cordialement, Julie", :historyId=>"227960", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"MIME-Version", :value=>"1.0"}, {:name=>"Received", :value=>"by 10.64.21.4 with HTTP; Tue, 13 Jan 2015 09:28:31 -0800 (PST)"}, {:name=>"Date", :value=>"Tue, 13 Jan 2015 18:28:31 +0100"}, {:name=>"Message-ID", :value=>"<CAFXNVWSNjE652y4nau3nbWeoJ7RD_UsybHWa9-L6vvRi9j3nFQ@mail.gmail.com>"}, {:name=>"Subject", :value=>""}, {:name=>"From", :value=>"Julie Desk <julie@juliedesk.com>"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=f46d042abf34a36bd9050c8bf335"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}], :body=>{:size=>28, :data=>"c2QNCkNvcmRpYWxlbWVudCwNCg0KSnVsaWUNCg=="}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=UTF-8"}], :body=>{:size=>154, :data=>"PGRpdiBkaXI9Imx0ciI-c2Q8YnIgY2xlYXI9ImFsbCI-PGRpdj48ZGl2IGNsYXNzPSJnbWFpbF9zaWduYXR1cmUiPjxkaXYgZGlyPSJsdHIiPkNvcmRpYWxlbWVudCw8ZGl2Pjxicj48L2Rpdj48ZGl2Pkp1bGllPC9kaXY-PC9kaXY-PC9kaXY-PC9kaXY-DQo8L2Rpdj4NCg=="}}]}, :sizeEstimate=>710},
          {:id=>"14ae456f2ff1e3e4", :threadId=>"14ae456f2ff1e3e4", :labelIds=>["UNREAD"], :snippet=>"sd Cordialement, Julie", :historyId=>"227960", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"MIME-Version", :value=>"1.0"}, {:name=>"Received", :value=>"by 10.64.21.4 with HTTP; Tue, 13 Jan 2015 09:28:31 -0800 (PST)"}, {:name=>"Date", :value=>"Tue, 13 Jan 2015 18:28:31 +0100"}, {:name=>"Message-ID", :value=>"<CAFXNVWSNjE652y4nau3nbWeoJ7RD_UsybHWa9-L6vvRi9j3nFQ@mail.gmail.com>"}, {:name=>"Subject", :value=>""}, {:name=>"From", :value=>"Julie Desk <julie@juliedesk.com>"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=f46d042abf34a36bd9050c8bf335"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}], :body=>{:size=>28, :data=>"c2QNCkNvcmRpYWxlbWVudCwNCg0KSnVsaWUNCg=="}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=UTF-8"}], :body=>{:size=>154, :data=>"PGRpdiBkaXI9Imx0ciI-c2Q8YnIgY2xlYXI9ImFsbCI-PGRpdj48ZGl2IGNsYXNzPSJnbWFpbF9zaWduYXR1cmUiPjxkaXYgZGlyPSJsdHIiPkNvcmRpYWxlbWVudCw8ZGl2Pjxicj48L2Rpdj48ZGl2Pkp1bGllPC9kaXY-PC9kaXY-PC9kaXY-PC9kaXY-DQo8L2Rpdj4NCg=="}}]}, :sizeEstimate=>710},

      ]}.merge(params)
    end

    def test_thread_list
      {:threads=>[{:id=>"14ae456f2ff1e3e4", :snippet=>"", :historyId=>"227960"}, {:id=>"14ae4438ed604170", :snippet=>"", :historyId=>"227955"}, {:id=>"14ac91101e18bed8", :snippet=>"", :historyId=>"227646"}, {:id=>"14ae3d759a2166d1", :snippet=>"", :historyId=>"227565"}, {:id=>"14acfd71d2f20308", :snippet=>"", :historyId=>"227430"}], :nextPageToken=>"11260038910369504656", :resultSizeEstimate=>25}
    end

    def test_message(params = {})
      {:id=>"14ada61b92db5e63", :threadId=>"14ada58320652fc7", :labelIds=>["IMPORTANT", "CATEGORY_PERSONAL"], :snippet=>"Bonsoir David Merci pour votre retour. Je verrai demain avec Julie, quand fixer un RDV téléphonique.", :historyId=>"219674", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"Delivered-To", :value=>"julie@juliedesk.com"}, {:name=>"Received", :value=>"by 10.64.89.39 with SMTP id bl7csp849585ieb;        Sun, 11 Jan 2015 11:04:05 -0800 (PST)"}, {:name=>"X-Received", :value=>"by 10.180.75.237 with SMTP id f13mr23178958wiw.69.1421003044898;        Sun, 11 Jan 2015 11:04:04 -0800 (PST)"}, {:name=>"Return-Path", :value=>"<arlenebentolila@gmail.com>"}, {:name=>"Received", :value=>"from mail-wg0-x232.google.com (mail-wg0-x232.google.com. [2a00:1450:400c:c00::232])        by mx.google.com with ESMTPS id o4si9737386wia.79.2015.01.11.11.04.04        for <julie@juliedesk.com>        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);        Sun, 11 Jan 2015 11:04:04 -0800 (PST)"}, {:name=>"Received-SPF", :value=>"pass (google.com: domain of arlenebentolila@gmail.com designates 2a00:1450:400c:c00::232 as permitted sender) client-ip=2a00:1450:400c:c00::232;"}, {:name=>"Authentication-Results", :value=>"mx.google.com;       spf=pass (google.com: domain of arlenebentolila@gmail.com designates 2a00:1450:400c:c00::232 as permitted sender) smtp.mail=arlenebentolila@gmail.com;       dkim=pass header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com"}, {:name=>"Received", :value=>"by mail-wg0-f50.google.com with SMTP id a1so15938647wgh.9        for <julie@juliedesk.com>; Sun, 11 Jan 2015 11:04:04 -0800 (PST)"}, {:name=>"DKIM-Signature", :value=>"v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=content-type:mime-version:subject:from:in-reply-to:date:cc         :content-transfer-encoding:message-id:references:to;        bh=mEmKhvWjFpq+DnO0xxdPjpd/i7MTfctQp+prGlYASc4=;        b=ouf26RPtOvk9wATJjcDxdOET2WD58x6efOOd8sZXt9c09mCoAsocVHyihpWWacId9j         qtuhKv/bTOe8AbMnk3JU4PHgnyJyCDL3gRjUrnlzMmwb92gd2c6TxS/p711fYvDfrz+L         jyABwocRbJSBTH/YsGPh/sP/z89oE0Aox5QIvd7PE1ykUWIhk4GVhGx7qf/SEImA4oGB         zb17MgSVHx7s9glVeibxturDZXJPSPS/sFX4VgHtMT4GlKvjtiLKJl3G+rIAbV+YsIet         zmcrurpZM97/ztnL/8IrQG17Kqe+JqanNlVwvhEMfTLOxooC+5p1v1tdHvN+8RMAcYWv         QyrQ=="}, {:name=>"X-Received", :value=>"by 10.194.175.102 with SMTP id bz6mr2702286wjc.120.1421003043927;        Sun, 11 Jan 2015 11:04:03 -0800 (PST)"}, {:name=>"Return-Path", :value=>"<arlenebentolila@gmail.com>"}, {:name=>"Received", :value=>"from [192.168.0.39] (fes75-2-78-192-50-38.fbxo.proxad.net. [78.192.50.38])        by mx.google.com with ESMTPSA id i15sm18583199wjq.22.2015.01.11.11.04.02        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);        Sun, 11 Jan 2015 11:04:02 -0800 (PST)"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=Apple-Mail-47C5C329-5673-4226-945A-D9F99028CBB5"}, {:name=>"Mime-Version", :value=>"1.0 (1.0)"}, {:name=>"Subject", :value=>"Re: Recommandation Sup de Luxe pour sujet de mémoire Arlène Bentolila"}, {:name=>"From", :value=>"\"Arlène Bentolila\" <arlenebentolila@gmail.com>"}, {:name=>"X-Mailer", :value=>"iPhone Mail (12B440)"}, {:name=>"In-Reply-To", :value=>"<CAFgv0K+4a9t+myY1o=pyeDS8FnaEbqff1=gLmC45eXP5nyR9ww@mail.gmail.com>"}, {:name=>"Date", :value=>"Sun, 11 Jan 2015 20:04:01 +0100"}, {:name=>"Cc", :value=>"Julie Desk <julie@juliedesk.com>"}, {:name=>"Bcc", :value=>"Julien <julien@juliedesk.com>"}, {:name=>"Content-Transfer-Encoding", :value=>"7bit"}, {:name=>"Message-Id", :value=>"<CF1519BA-7935-4F27-B41E-33CBF7637858@gmail.com>"}, {:name=>"References", :value=>"<CAHSJCBFtGzz7_BqoWqNgJUCsgoLZDyOj56-uT9pKB6+eoO6HGA@mail.gmail.com> <CAFgv0K+4a9t+myY1o=pyeDS8FnaEbqff1=gLmC45eXP5nyR9ww@mail.gmail.com>"}, {:name=>"To", :value=>"David Alexandre Klingbeil <dak@dymant.com>"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=utf-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>6912, :data=>"Qm9uc29pciBEYXZpZA0KDQpNZXJjaSBwb3VyIHZvdHJlIHJldG91ci4gSmUgdmVycmFpIGRlbWFpbiBhdmVjIEp1bGllLCBxdWFuZCBmaXhlciB1biBSRFYgdMOpbMOpcGhvbmlxdWUuIA0KDQpQb3VyIGluZm9yb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XV4IGTDqW1vbnRyZXIgcXVlIi4NCj4-IA0KPj4gIA0KPj4gDQo-PiBKZSByZXN0ZSDDoCB2b3RyZSDDqWNvdXRlIHBvdXIgZmluYWxpc2VyIGNldHRlIGZpY2hlIHDDqWRhZ29naXF1ZSBldCB2YWxpZGVyIG1vbiBzdWpldCBkZSBtw6ltb2lyZSBhdmFudCBsYSByZW50csOpZSBkZSBqYW52aWVyIHNpIGNlbGEgdm91cyBlc3QgcG9zc2libGUuIEplIHZhaXMgZCdvcmVzIGV0IGTDqWrDoCBjb21tZW5jZXIgbWVzIHJlY2hlcmNoZXMgZXQgZmFpcmUgdW5lIMOpYmF1Y2hlIGRlIHBsYW4gcGVuZGFudCBjZXMgdmFjYW5jZXMuIA0KPj4gDQo-PiAgDQo-PiANCj4-IEplIHZvdXMgc291aGFpdGUgZGUgdHLDqHMgYm9ubmVzIGbDqnRlcy4NCj4-IA0KPj4gIA0KPj4gDQo-PiBCaWVuIMOgIHZvdXMsDQo-PiANCj4-ICANCj4-IA0KPj4gQXJsw6huZQ0KPj4gDQo-IA0K"}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=utf-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>13612, :data=>"PGh0bWw-PGhlYWQ-PG1ldGEgaHR0cC1lcXVpdj0iY29udGVudC10eXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9dXRmLTgiPjwvaGVhZD48Ym9keSBkaXI9ImF1dG8iPjxkaXY-PGRpdj48cCBjbGFzcz0iTXNvTm9ybWFsIiBzdHlsZT0ibWFyZ2luOiAwY20gMGNtIDAuMDAwMXB0OyI-PHNwYW4gc3R5bGU9ImJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMCk7Ij48Yj5Cb25zb2lyIERhdmlkPC9iPjwvc3Bhbj48L3A-PHAgY2xhc3M9Ik1zb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lbnRyw6llIGRlIGphbnZpZXIgc2kgY2VsYSB2b3VzIGVzdCBwb3NzaWJsZS4gSmUgdmFpcyBkJ29yZXMgZXQgZMOpasOgIGNvbW1lbmNlciBtZXMgcmVjaGVyY2hlcyBldCBmYWlyZSB1bmUgw6liYXVjaGUgZGUgcGxhbiBwZW5kYW50IGNlcyB2YWNhbmNlcy4mbmJzcDs8dT48L3U-PHU-PC91PjwvcD48L2Rpdj48ZGl2PjxwIGNsYXNzPSJNc29Ob3JtYWwiPjx1PjwvdT4mbmJzcDs8dT48L3U-PC9wPjwvZGl2PjxkaXY-PHAgY2xhc3M9Ik1zb05vcm1hbCI-SmUgdm91cyBzb3VoYWl0ZSBkZSB0csOocyBib25uZXMgZsOqdGVzLjx1PjwvdT48dT48L3U-PC9wPjwvZGl2PjxkaXY-PHAgY2xhc3M9Ik1zb05vcm1hbCI-PHU-PC91PiZuYnNwOzx1PjwvdT48L3A-PC9kaXY-PGRpdj48cCBjbGFzcz0iTXNvTm9ybWFsIj5CaWVuIMOgIHZvdXMsPHU-PC91Pjx1PjwvdT48L3A-PC9kaXY-PGRpdj48cCBjbGFzcz0iTXNvTm9ybWFsIj48dT48L3U-Jm5ic3A7PHU-PC91PjwvcD48L2Rpdj48ZGl2PjxwIGNsYXNzPSJNc29Ob3JtYWwiPkFybMOobmU8dT48L3U-PHU-PC91PjwvcD48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj48L2Rpdj4NCjxicj48YnI-PC9kaXY-PC9kaXY-PGJyPjwvZGl2Pg0KPC9ibG9ja3F1b3RlPjwvZGl2Pjxicj48L2Rpdj4NCjwvZGl2PjwvYmxvY2txdW90ZT48L2JvZHk-PC9odG1sPg=="}}]}, :sizeEstimate=>26532}.merge(params)
    end


    def test_to_reply_message(params = {})
      {:id=>"14aecf708ee65122", :threadId=>"14aecf708ee65122", :labelIds=>["INBOX", "IMPORTANT", "CATEGORY_PERSONAL", "UNREAD"], :snippet=>"coucou Julien Hobeika | Co-Founder &amp; CEO Email: julien@juliedesk.com Tel: +33 6 63 33 17 55 Julie", :historyId=>"232755", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"Delivered-To", :value=>"julie@juliedesk.com"}, {:name=>"Received", :value=>"by 10.64.89.39 with SMTP id bl7csp1888330ieb;        Thu, 15 Jan 2015 01:40:21 -0800 (PST)"}, {:name=>"X-Received", :value=>"by 10.194.2.75 with SMTP id 11mr16697173wjs.78.1421314820755;        Thu, 15 Jan 2015 01:40:20 -0800 (PST)"}, {:name=>"Return-Path", :value=>"<julien@wepopp.com>"}, {:name=>"Received", :value=>"from mail-wg0-f52.google.com (mail-wg0-f52.google.com. [74.125.82.52])        by mx.google.com with ESMTPS id cz7si1861265wjc.17.2015.01.15.01.40.19        for <julie@juliedesk.com>        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);        Thu, 15 Jan 2015 01:40:20 -0800 (PST)"}, {:name=>"Received-SPF", :value=>"pass (google.com: domain of julien@wepopp.com designates 74.125.82.52 as permitted sender) client-ip=74.125.82.52;"}, {:name=>"Authentication-Results", :value=>"mx.google.com;       spf=pass (google.com: domain of julien@wepopp.com designates 74.125.82.52 as permitted sender) smtp.mail=julien@wepopp.com"}, {:name=>"Received", :value=>"by mail-wg0-f52.google.com with SMTP id x12so13734359wgg.11        for <julie@juliedesk.com>; Thu, 15 Jan 2015 01:40:19 -0800 (PST)"}, {:name=>"X-Google-DKIM-Signature", :value=>"v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc         :content-type;        bh=VX+NTBD3y6zC7y2eoK6dXfXslqvi6t2cSoTCjb3ydPE=;        b=GJnt5rk9Ck0uf9drEbY8tmxHqEosl3+89TyqId0TMttNgmjhV+rTX5tGe1N1wbPS0o         ZMl5zDe/A5GGd7PHa8ykZZwNv5GQn0cjMQIMs+nMyUTUCUYeioWirF3frDJ8siV7+EXF         s+l5+8Ul3suVPTcg5+zoNGgTJu3mWBC4E+1KMbVLYNOZtOd5PEMJPCZuTu2/k8Vw0Iw6         8JG02sSAzWRxNJnUoCRrShTV7C+eNRehvI7utHGMrobP1chWb2qZgLvbwGnpo/eBceya         XWo/bpd9OcAYhb0spf0M2pXJ6TL/fzYbplFj0Lj8sXfRphQJivUjUVj4F02Tty2HpQ+q         4kQw=="}, {:name=>"X-Gm-Message-State", :value=>"ALoCoQk6eM56sO2fhoPw1I+al4RvoL3xd/Mzo7nmPK4WlB/OUaOD0isPUduI2MUrEdZgQ8tty/AH"}, {:name=>"X-Received", :value=>"by 10.180.126.99 with SMTP id mx3mr17257983wib.66.1421314819809; Thu, 15 Jan 2015 01:40:19 -0800 (PST)"}, {:name=>"MIME-Version", :value=>"1.0"}, {:name=>"Received", :value=>"by 10.180.8.228 with HTTP; Thu, 15 Jan 2015 01:39:59 -0800 (PST)"}, {:name=>"From", :value=>"Julien Hobeika <julien@juliedesk.com>"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 10:39:59 +0100"}, {:name=>"Message-ID", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"test reply message"}, {:name=>"To", :value=>"Julie Desk <julie@juliedesk.com>, Julien Hobeika <julien.hobeika@gmail.com>"}, {:name=>"Cc", :value=>"Julien Hobeika <julien@juliedesk.com>, Nicolas Marlier <nicolas@wepopp.com>"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=e89a8f8389d1f2fbe9050cada4ac"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>144, :data=>"Y291Y291DQoNCg0KKkp1bGllbiBIb2JlaWthIHwgQ28tRm91bmRlciAmIENFTypFbWFpbDoganVsaWVuQGp1bGllZGVzay5jb20NClRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCg0KKkp1bGllIERlc2sqDQp3d3cuanVsaWVkZXNrLmNvbQ0KDQoNCuGQpw0K"}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>742, :data=>"PGRpdiBkaXI9Imx0ciI-Y291Y291PGJyIGNsZWFyPSJhbGwiPjxkaXY-PGRpdiBjbGFzcz0iZ21haWxfc2lnbmF0dXJlIj48ZGl2IGRpcj0ibHRyIj48cD48Yj5KdWxpZW4gSG9iZWlrYSB8IENvLUZvdW5kZXIgJmFtcDsgQ0VPPGJyPjwvYj5FbWFpbDrCoDxhIGhyZWY9Im1haWx0bzpqdWxpZW5AanVsaWVkZXNrLmNvbSIgdGFyZ2V0PSJfYmxhbmsiPmp1bGllbkBqdWxpZWRlc2suY29tPC9hPjxicj5UZWw6ICszMyA2IDYzIDMzIDE3IDU1PC9wPjxwPjxiPkp1bGllIERlc2s8L2I-PGI-PGJyPjwvYj48YSBocmVmPSJodHRwOi8vd3d3Lmp1bGllZGVzay5jb20vIiBzdHlsZT0iY29sb3I6cmdiKDE3LDg1LDIwNCk7Zm9udC1mYW1pbHk6SGVsdmV0aWNhIiB0YXJnZXQ9Il9ibGFuayI-d3d3Lmp1bGllZGVzay5jb208L2E-PGI-PGJyPjwvYj48L3A-PHA-PGJyPjwvcD48L2Rpdj48L2Rpdj48L2Rpdj4NCjxkaXYgaHNwYWNlPSJzdHJlYWstcHQtbWFyayIgc3R5bGU9Im1heC1oZWlnaHQ6MXB4Ij48aW1nIHN0eWxlPSJ3aWR0aDowcHg7IG1heC1oZWlnaHQ6MHB4OyIgc3JjPSJodHRwczovL21haWxmb29nYWUuYXBwc3BvdC5jb20vdD9zZW5kZXI9YWFuVnNhV1Z1UUhkbGNHOXdjQzVqYjIwJTNEJmFtcDt0eXBlPXplcm9jb250ZW50JmFtcDtndWlkPTBiMWRiODRkLTFmMTctNDE1MS05ZmE5LTUxMWNiYTg0ODAyMiI-PGZvbnQgY29sb3I9IiNmZmZmZmYiIHNpemU9IjEiPuGQpzwvZm9udD48L2Rpdj48L2Rpdj4NCg=="}}]}, :sizeEstimate=>3710}
    end

    def test_to_reply_message2(params = {}) #without delivered_to in headers
      {:id=>"14aecf708ee65122", :threadId=>"14aecf708ee65122", :labelIds=>["INBOX", "IMPORTANT", "CATEGORY_PERSONAL", "UNREAD"], :snippet=>"coucou Julien Hobeika | Co-Founder &amp; CEO Email: julien@juliedesk.com Tel: +33 6 63 33 17 55 Julie", :historyId=>"232755", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"Received", :value=>"by 10.64.89.39 with SMTP id bl7csp1888330ieb;        Thu, 15 Jan 2015 01:40:21 -0800 (PST)"}, {:name=>"X-Received", :value=>"by 10.194.2.75 with SMTP id 11mr16697173wjs.78.1421314820755;        Thu, 15 Jan 2015 01:40:20 -0800 (PST)"}, {:name=>"Return-Path", :value=>"<julien@wepopp.com>"}, {:name=>"Received", :value=>"from mail-wg0-f52.google.com (mail-wg0-f52.google.com. [74.125.82.52])        by mx.google.com with ESMTPS id cz7si1861265wjc.17.2015.01.15.01.40.19        for <julie@juliedesk.com>        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);        Thu, 15 Jan 2015 01:40:20 -0800 (PST)"}, {:name=>"Received-SPF", :value=>"pass (google.com: domain of julien@wepopp.com designates 74.125.82.52 as permitted sender) client-ip=74.125.82.52;"}, {:name=>"Authentication-Results", :value=>"mx.google.com;       spf=pass (google.com: domain of julien@wepopp.com designates 74.125.82.52 as permitted sender) smtp.mail=julien@wepopp.com"}, {:name=>"Received", :value=>"by mail-wg0-f52.google.com with SMTP id x12so13734359wgg.11        for <julie@juliedesk.com>; Thu, 15 Jan 2015 01:40:19 -0800 (PST)"}, {:name=>"X-Google-DKIM-Signature", :value=>"v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc         :content-type;        bh=VX+NTBD3y6zC7y2eoK6dXfXslqvi6t2cSoTCjb3ydPE=;        b=GJnt5rk9Ck0uf9drEbY8tmxHqEosl3+89TyqId0TMttNgmjhV+rTX5tGe1N1wbPS0o         ZMl5zDe/A5GGd7PHa8ykZZwNv5GQn0cjMQIMs+nMyUTUCUYeioWirF3frDJ8siV7+EXF         s+l5+8Ul3suVPTcg5+zoNGgTJu3mWBC4E+1KMbVLYNOZtOd5PEMJPCZuTu2/k8Vw0Iw6         8JG02sSAzWRxNJnUoCRrShTV7C+eNRehvI7utHGMrobP1chWb2qZgLvbwGnpo/eBceya         XWo/bpd9OcAYhb0spf0M2pXJ6TL/fzYbplFj0Lj8sXfRphQJivUjUVj4F02Tty2HpQ+q         4kQw=="}, {:name=>"X-Gm-Message-State", :value=>"ALoCoQk6eM56sO2fhoPw1I+al4RvoL3xd/Mzo7nmPK4WlB/OUaOD0isPUduI2MUrEdZgQ8tty/AH"}, {:name=>"X-Received", :value=>"by 10.180.126.99 with SMTP id mx3mr17257983wib.66.1421314819809; Thu, 15 Jan 2015 01:40:19 -0800 (PST)"}, {:name=>"MIME-Version", :value=>"1.0"}, {:name=>"Received", :value=>"by 10.180.8.228 with HTTP; Thu, 15 Jan 2015 01:39:59 -0800 (PST)"}, {:name=>"From", :value=>"Julien Hobeika <julien@juliedesk.com>"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 10:39:59 +0100"}, {:name=>"Message-ID", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"test reply message"}, {:name=>"To", :value=>"Julie Desk <julie@juliedesk.com>, Julien Hobeika <julien.hobeika@gmail.com>"}, {:name=>"Cc", :value=>"Julien Hobeika <julien@juliedesk.com>, Nicolas Marlier <nicolas@wepopp.com>"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=e89a8f8389d1f2fbe9050cada4ac"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>144, :data=>"Y291Y291DQoNCg0KKkp1bGllbiBIb2JlaWthIHwgQ28tRm91bmRlciAmIENFTypFbWFpbDoganVsaWVuQGp1bGllZGVzay5jb20NClRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCg0KKkp1bGllIERlc2sqDQp3d3cuanVsaWVkZXNrLmNvbQ0KDQoNCuGQpw0K"}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>742, :data=>"PGRpdiBkaXI9Imx0ciI-Y291Y291PGJyIGNsZWFyPSJhbGwiPjxkaXY-PGRpdiBjbGFzcz0iZ21haWxfc2lnbmF0dXJlIj48ZGl2IGRpcj0ibHRyIj48cD48Yj5KdWxpZW4gSG9iZWlrYSB8IENvLUZvdW5kZXIgJmFtcDsgQ0VPPGJyPjwvYj5FbWFpbDrCoDxhIGhyZWY9Im1haWx0bzpqdWxpZW5AanVsaWVkZXNrLmNvbSIgdGFyZ2V0PSJfYmxhbmsiPmp1bGllbkBqdWxpZWRlc2suY29tPC9hPjxicj5UZWw6ICszMyA2IDYzIDMzIDE3IDU1PC9wPjxwPjxiPkp1bGllIERlc2s8L2I-PGI-PGJyPjwvYj48YSBocmVmPSJodHRwOi8vd3d3Lmp1bGllZGVzay5jb20vIiBzdHlsZT0iY29sb3I6cmdiKDE3LDg1LDIwNCk7Zm9udC1mYW1pbHk6SGVsdmV0aWNhIiB0YXJnZXQ9Il9ibGFuayI-d3d3Lmp1bGllZGVzay5jb208L2E-PGI-PGJyPjwvYj48L3A-PHA-PGJyPjwvcD48L2Rpdj48L2Rpdj48L2Rpdj4NCjxkaXYgaHNwYWNlPSJzdHJlYWstcHQtbWFyayIgc3R5bGU9Im1heC1oZWlnaHQ6MXB4Ij48aW1nIHN0eWxlPSJ3aWR0aDowcHg7IG1heC1oZWlnaHQ6MHB4OyIgc3JjPSJodHRwczovL21haWxmb29nYWUuYXBwc3BvdC5jb20vdD9zZW5kZXI9YWFuVnNhV1Z1UUhkbGNHOXdjQzVqYjIwJTNEJmFtcDt0eXBlPXplcm9jb250ZW50JmFtcDtndWlkPTBiMWRiODRkLTFmMTctNDE1MS05ZmE5LTUxMWNiYTg0ODAyMiI-PGZvbnQgY29sb3I9IiNmZmZmZmYiIHNpemU9IjEiPuGQpzwvZm9udD48L2Rpdj48L2Rpdj4NCg=="}}]}, :sizeEstimate=>3710}
    end

    def test_reply_message(params = {})
      {body: "test"}
    end

    def test_forward_message
      {to: "julien@wepopp.com", bbc: "julien.hobeika@gmail.com", cc: "julien@juliedesk.com, nicolas@juliedesk.com", subject: "cool subject", body: "test"}
    end

    def test_forward_message_with_html
      {to: "julien@wepopp.com", bbc: "julien.hobeika@gmail.com", cc: "julien@juliedesk.com, nicolas@juliedesk.com", subject: "cool subject", text: "test", html: "<b>test</b>"}
    end

    def test_forwarded_message
      {:id=>"14aef32bd53a74bb", :threadId=>"14aecf708ee65122", :labelIds=>["SENT"], :snippet=>"test Thu, 15 Jan 2015 10:39:59 +0100 Julien Hobeika &lt;julien@juliedesk.com&gt;: &gt;coucou &gt;", :historyId=>"234207", :payload=>{:partId=>"", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Received", :value=>"from 992877924458-i6nbjvo0fspv8hpmpss0i9aglneqrdpm.apps.googleusercontent.com named unknown by gmailapi.google.com with HTTPREST; Thu, 15 Jan 2015 12:04:47 -0800"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 12:04:47 -0800"}, {:name=>"To", :value=>"julien@wepopp.com"}, {:name=>"Cc", :value=>"julien@juliedesk.com, nicolas@juliedesk.com"}, {:name=>"Message-Id", :value=>"<CAFXNVWTyUTRoC-yqHd0zmaAF8heyWAO3Hskfv_uxESWwgtX9Mg@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"References", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"cool subject"}, {:name=>"Mime-Version", :value=>"1.0"}, {:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}, {:name=>"From", :value=>"julie@juliedesk.com"}], :body=>{:size=>238, :data=>"dGVzdA0KDQpUaHUsIDE1IEphbiAyMDE1IDEwOjM5OjU5ICswMTAwIEp1bGllbiBIb2JlaWthIDxqdWxpZW5AanVsaWVkZXNrLmNvbT46DQoNCj5jb3Vjb3UNCj4NCj4NCj4qSnVsaWVuIEhvYmVpa2EgfCBDby1Gb3VuZGVyICYgQ0VPKkVtYWlsOiBqdWxpZW5AanVsaWVkZXNrLmNvbQ0KPlRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCj4NCj4qSnVsaWUgRGVzayoNCj53d3cuanVsaWVkZXNrLmNvbQ0KPg0KPg0KPuGQpw0KPg=="}}, :sizeEstimate=>948}
    end


    def test_forwarded_message_with_html
      {:id=>"14aef33bfcd19656", :threadId=>"14aecf708ee65122", :labelIds=>["SENT"], :snippet=>"test Thu, 15 Jan 2015 10:39:59 +0100 Julien Hobeika &lt;julien@juliedesk.com&gt;: coucou Julien", :historyId=>"234237", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"Received", :value=>"from 992877924458-i6nbjvo0fspv8hpmpss0i9aglneqrdpm.apps.googleusercontent.com named unknown by gmailapi.google.com with HTTPREST; Thu, 15 Jan 2015 12:05:53 -0800"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 12:05:53 -0800"}, {:name=>"To", :value=>"julien@wepopp.com"}, {:name=>"Cc", :value=>"julien@juliedesk.com, nicolas@juliedesk.com"}, {:name=>"Message-Id", :value=>"<CAFXNVWR8k5sc39WbqyUoEA-ssYRtx0RALtNUkdDL1M9g6w3dEA@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"References", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"cool subject"}, {:name=>"Mime-Version", :value=>"1.0"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=\"--==_mimepart_54b81da0a179_d3733fe0444541d8958c\"; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"7bit"}, {:name=>"From", :value=>"julie@juliedesk.com"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>238, :data=>"dGVzdA0KDQpUaHUsIDE1IEphbiAyMDE1IDEwOjM5OjU5ICswMTAwIEp1bGllbiBIb2JlaWthIDxqdWxpZW5AanVsaWVkZXNrLmNvbT46DQoNCj5jb3Vjb3UNCj4NCj4NCj4qSnVsaWVuIEhvYmVpa2EgfCBDby1Gb3VuZGVyICYgQ0VPKkVtYWlsOiBqdWxpZW5AanVsaWVkZXNrLmNvbQ0KPlRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCj4NCj4qSnVsaWUgRGVzayoNCj53d3cuanVsaWVkZXNrLmNvbQ0KPg0KPg0KPuGQpw0KPg=="}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=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naHQ6MXB4Ij48aW1nIHN0eWxlPSJ3aWR0aDowcHg7IG1heC1oZWlnaHQ6MHB4OyIgc3JjPSJodHRwczovL21haWxmb29nYWUuYXBwc3BvdC5jb20vdD9zZW5kZXI9YWFuVnNhV1Z1UUhkbGNHOXdjQzVqYjIwJTNEJmFtcDt0eXBlPXplcm9jb250ZW50JmFtcDtndWlkPTBiMWRiODRkLTFmMTctNDE1MS05ZmE5LTUxMWNiYTg0ODAyMiI-PGZvbnQgY29sb3I9IiNmZmZmZmYiIHNpemU9IjEiPuGQpzwvZm9udD48L2Rpdj48L2Rpdj4NCjwvYmxvY2txdW90ZT48L2Rpdj48YnI-"}}]}, :sizeEstimate=>2448}
    end

    def test_reply_message_with_html(params = {})
      {html: "<b>test</b>", text: "test"}
    end

    def test_replied_message(params = {})
      {:id=>"14aecf9e31d945ba", :threadId=>"14aecf708ee65122", :labelIds=>["SENT", "INBOX", "UNREAD"], :snippet=>"test Thu, 15 Jan 2015 10:39:59 +0100 Julien Hobeika &lt;julien@juliedesk.com&gt;: &gt;coucou &gt;", :historyId=>"232799", :payload=>{:partId=>"", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Received", :value=>"from 992877924458-i6nbjvo0fspv8hpmpss0i9aglneqrdpm.apps.googleusercontent.com named unknown by gmailapi.google.com with HTTPREST; Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"To", :value=>"Julien Hobeika <julien@juliedesk.com>"}, {:name=>"Cc", :value=>"Julien Hobeika <julien.hobeika@gmail.com>, Julien Hobeika <julien@juliedesk.com>, Nicolas Marlier <nicolas@wepopp.com>"}, {:name=>"Message-Id", :value=>"<CAFXNVWSqyaY6Qp7s6iTm9GwTVpCxgTxSCaa3UMU8rpNzZc+-Uw@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"References", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"test reply message"}, {:name=>"Mime-Version", :value=>"1.0"}, {:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}, {:name=>"From", :value=>"julie@juliedesk.com"}], :body=>{:size=>238, :data=>"dGVzdA0KDQpUaHUsIDE1IEphbiAyMDE1IDEwOjM5OjU5ICswMTAwIEp1bGllbiBIb2JlaWthIDxqdWxpZW5AanVsaWVkZXNrLmNvbT46DQoNCj5jb3Vjb3UNCj4NCj4NCj4qSnVsaWVuIEhvYmVpa2EgfCBDby1Gb3VuZGVyICYgQ0VPKkVtYWlsOiBqdWxpZW5AanVsaWVkZXNrLmNvbQ0KPlRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCj4NCj4qSnVsaWUgRGVzayoNCj53d3cuanVsaWVkZXNrLmNvbQ0KPg0KPg0KPuGQpw0KPg=="}}, :sizeEstimate=>1089}
    end


    def test_replied_message_with_html(params = {})
      {:id=>"14aef0d08d39b4df", :threadId=>"14aecf708ee65122", :labelIds=>["SENT", "INBOX", "UNREAD"], :snippet=>"test Thu, 15 Jan 2015 10:39:59 +0100 Julien Hobeika &lt;julien@juliedesk.com&gt;: coucou Julien", :historyId=>"234054", :payload=>{:mimeType=>"multipart/alternative", :filename=>"", :headers=>[{:name=>"Received", :value=>"from 992877924458-i6nbjvo0fspv8hpmpss0i9aglneqrdpm.apps.googleusercontent.com named unknown by gmailapi.google.com with HTTPREST; Thu, 15 Jan 2015 11:23:36 -0800"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 11:23:36 -0800"}, {:name=>"To", :value=>"Julien Hobeika <julien@juliedesk.com>"}, {:name=>"Cc", :value=>"Julien Hobeika <julien.hobeika@gmail.com>, Julien Hobeika <julien@juliedesk.com>, Nicolas Marlier <nicolas@wepopp.com>"}, {:name=>"Message-Id", :value=>"<CAFXNVWQO=9Z5LaNgSUQTEA4ucDw4LA5BbA-Qv6RpcLq0kOKM6A@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"References", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"test reply message"}, {:name=>"Mime-Version", :value=>"1.0"}, {:name=>"Content-Type", :value=>"multipart/alternative; boundary=\"--==_mimepart_54b813b749eaa_d0963fc7bc45c1d0581fa\"; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"7bit"}, {:name=>"From", :value=>"julie@juliedesk.com"}], :body=>{:size=>0}, :parts=>[{:partId=>"0", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>238, :data=>"dGVzdA0KDQpUaHUsIDE1IEphbiAyMDE1IDEwOjM5OjU5ICswMTAwIEp1bGllbiBIb2JlaWthIDxqdWxpZW5AanVsaWVkZXNrLmNvbT46DQoNCj5jb3Vjb3UNCj4NCj4NCj4qSnVsaWVuIEhvYmVpa2EgfCBDby1Gb3VuZGVyICYgQ0VPKkVtYWlsOiBqdWxpZW5AanVsaWVkZXNrLmNvbQ0KPlRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCj4NCj4qSnVsaWUgRGVzayoNCj53d3cuanVsaWVkZXNrLmNvbQ0KPg0KPg0KPuGQpw0KPg=="}}, {:partId=>"1", :mimeType=>"text/html", :filename=>"", :headers=>[{:name=>"Content-Type", :value=>"text/html; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}], :body=>{:size=>1005, :data=>"PGRpdj48Yj50ZXN0PC9iPjwvZGl2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wc3BvdC5jb20vdD9zZW5kZXI9YWFuVnNhV1Z1UUhkbGNHOXdjQzVqYjIwJTNEJmFtcDt0eXBlPXplcm9jb250ZW50JmFtcDtndWlkPTBiMWRiODRkLTFmMTctNDE1MS05ZmE5LTUxMWNiYTg0ODAyMiI-PGZvbnQgY29sb3I9IiNmZmZmZmYiIHNpemU9IjEiPuGQpzwvZm9udD48L2Rpdj48L2Rpdj4NCjwvYmxvY2txdW90ZT48L2Rpdj48YnI-"}}]}, :sizeEstimate=>2597}
    end



    def test_unread_message(params = {})
      {:id=>"14aecf9e31d945ba", :threadId=>"14aecf708ee65122", :labelIds=>["IMPORTANT", "CATEGORY_PERSONAL","UNREAD"], :snippet=>"test Thu, 15 Jan 2015 10:39:59 +0100 Julien Hobeika &lt;julien@juliedesk.com&gt;: &gt;coucou &gt;", :historyId=>"232799", :payload=>{:partId=>"", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Received", :value=>"from 992877924458-i6nbjvo0fspv8hpmpss0i9aglneqrdpm.apps.googleusercontent.com named unknown by gmailapi.google.com with HTTPREST; Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"To", :value=>"Julien Hobeika <julien@juliedesk.com>"}, {:name=>"Cc", :value=>"Julien Hobeika <julien.hobeika@gmail.com>, Julien Hobeika <julien@juliedesk.com>, Nicolas Marlier <nicolas@wepopp.com>"}, {:name=>"Message-Id", :value=>"<CAFXNVWSqyaY6Qp7s6iTm9GwTVpCxgTxSCaa3UMU8rpNzZc+-Uw@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"References", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"test reply message"}, {:name=>"Mime-Version", :value=>"1.0"}, {:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}, {:name=>"From", :value=>"julie@juliedesk.com"}], :body=>{:size=>238, :data=>"dGVzdA0KDQpUaHUsIDE1IEphbiAyMDE1IDEwOjM5OjU5ICswMTAwIEp1bGllbiBIb2JlaWthIDxqdWxpZW5AanVsaWVkZXNrLmNvbT46DQoNCj5jb3Vjb3UNCj4NCj4NCj4qSnVsaWVuIEhvYmVpa2EgfCBDby1Gb3VuZGVyICYgQ0VPKkVtYWlsOiBqdWxpZW5AanVsaWVkZXNrLmNvbQ0KPlRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCj4NCj4qSnVsaWUgRGVzayoNCj53d3cuanVsaWVkZXNrLmNvbQ0KPg0KPg0KPuGQpw0KPg=="}}, :sizeEstimate=>1089}
    end

    def test_sent_message(params = {})
      {:id=>"14aecf9e31d945ba", :threadId=>"14aecf708ee65122", :labelIds=>["IMPORTANT", "CATEGORY_PERSONAL","SENT"], :snippet=>"test Thu, 15 Jan 2015 10:39:59 +0100 Julien Hobeika &lt;julien@juliedesk.com&gt;: &gt;coucou &gt;", :historyId=>"232799", :payload=>{:partId=>"", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Received", :value=>"from 992877924458-i6nbjvo0fspv8hpmpss0i9aglneqrdpm.apps.googleusercontent.com named unknown by gmailapi.google.com with HTTPREST; Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"To", :value=>"Julien Hobeika <julien@juliedesk.com>"}, {:name=>"Cc", :value=>"Julien Hobeika <julien.hobeika@gmail.com>, Julien Hobeika <julien@juliedesk.com>, Nicolas Marlier <nicolas@wepopp.com>"}, {:name=>"Message-Id", :value=>"<CAFXNVWSqyaY6Qp7s6iTm9GwTVpCxgTxSCaa3UMU8rpNzZc+-Uw@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"References", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"test reply message"}, {:name=>"Mime-Version", :value=>"1.0"}, {:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}, {:name=>"From", :value=>"julie@juliedesk.com"}], :body=>{:size=>238, :data=>"dGVzdA0KDQpUaHUsIDE1IEphbiAyMDE1IDEwOjM5OjU5ICswMTAwIEp1bGllbiBIb2JlaWthIDxqdWxpZW5AanVsaWVkZXNrLmNvbT46DQoNCj5jb3Vjb3UNCj4NCj4NCj4qSnVsaWVuIEhvYmVpa2EgfCBDby1Gb3VuZGVyICYgQ0VPKkVtYWlsOiBqdWxpZW5AanVsaWVkZXNrLmNvbQ0KPlRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCj4NCj4qSnVsaWUgRGVzayoNCj53d3cuanVsaWVkZXNrLmNvbQ0KPg0KPg0KPuGQpw0KPg=="}}, :sizeEstimate=>1089}
    end

    def test_inbox_message(params = {})
      {:id=>"14aecf9e31d945ba", :threadId=>"14aecf708ee65122", :labelIds=>["IMPORTANT", "CATEGORY_PERSONAL","INBOX"], :snippet=>"test Thu, 15 Jan 2015 10:39:59 +0100 Julien Hobeika &lt;julien@juliedesk.com&gt;: &gt;coucou &gt;", :historyId=>"232799", :payload=>{:partId=>"", :mimeType=>"text/plain", :filename=>"", :headers=>[{:name=>"Received", :value=>"from 992877924458-i6nbjvo0fspv8hpmpss0i9aglneqrdpm.apps.googleusercontent.com named unknown by gmailapi.google.com with HTTPREST; Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"Date", :value=>"Thu, 15 Jan 2015 01:43:27 -0800"}, {:name=>"To", :value=>"Julien Hobeika <julien@juliedesk.com>"}, {:name=>"Cc", :value=>"Julien Hobeika <julien.hobeika@gmail.com>, Julien Hobeika <julien@juliedesk.com>, Nicolas Marlier <nicolas@wepopp.com>"}, {:name=>"Message-Id", :value=>"<CAFXNVWSqyaY6Qp7s6iTm9GwTVpCxgTxSCaa3UMU8rpNzZc+-Uw@mail.gmail.com>"}, {:name=>"In-Reply-To", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"References", :value=>"<CAA-2G7UbpEhf1G6-fF_ruSew7SRjsOpU+wPbmWufrknmbxQVZg@mail.gmail.com>"}, {:name=>"Subject", :value=>"test reply message"}, {:name=>"Mime-Version", :value=>"1.0"}, {:name=>"Content-Type", :value=>"text/plain; charset=UTF-8"}, {:name=>"Content-Transfer-Encoding", :value=>"quoted-printable"}, {:name=>"From", :value=>"julie@juliedesk.com"}], :body=>{:size=>238, :data=>"dGVzdA0KDQpUaHUsIDE1IEphbiAyMDE1IDEwOjM5OjU5ICswMTAwIEp1bGllbiBIb2JlaWthIDxqdWxpZW5AanVsaWVkZXNrLmNvbT46DQoNCj5jb3Vjb3UNCj4NCj4NCj4qSnVsaWVuIEhvYmVpa2EgfCBDby1Gb3VuZGVyICYgQ0VPKkVtYWlsOiBqdWxpZW5AanVsaWVkZXNrLmNvbQ0KPlRlbDogKzMzIDYgNjMgMzMgMTcgNTUNCj4NCj4qSnVsaWUgRGVzayoNCj53d3cuanVsaWVkZXNrLmNvbQ0KPg0KPg0KPuGQpw0KPg=="}}, :sizeEstimate=>1089}
    end

    def test_message_list
      {:messages=>[{:id=>"14ae456f2ff1e3e4", :threadId=>"14ae456f2ff1e3e4"}, {:id=>"14ae456891f20924", :threadId=>"14ae4438ed604170"}, {:id=>"14ae455204ed507e", :threadId=>"14ae4438ed604170"}, {:id=>"14ae45432aaf0c5a", :threadId=>"14ae4438ed604170"}, {:id=>"14ae4438ed604170", :threadId=>"14ae4438ed604170"}], :nextPageToken=>"05968490989102563512", :resultSizeEstimate=>20}
    end


  end
end